<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
// 初始态pending
const arr=new Promise((resolved,rejected,pending)=>{
    console.log('范圆圆');
})
console.log(arr);


// 成功态
const arr2=new Promise((resolved,rejected)=>{
    resolved();
})
console.log(arr2);

// 失败态
const arr3=new Promise((resolved,rejected)=>{
    // rejected(33);
    resolved(1)
})
console.log(arr3);

new Promise(function(resolve, reject) {
    console.log(1);
    setTimeout(()=>{
        console.log(2);
        resolve();
},2000)
}).then(()=>{
    console.log(3);
})
    </script>
</body>
</html>